package com.c6906.vdam.dps.runner;

import com.c6906.vdam.dps.service.TerminalBusinessInfoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Order(Integer.MIN_VALUE)
@Component
public class InitRunner implements CommandLineRunner {
    public static final Logger log = LoggerFactory.getLogger(InitRunner.class);
    @Resource
    TerminalBusinessInfoService terminalBusinessInfoService;

    @Override
    public void run(String... args) {
        log.info("开始初始化缓存");
        terminalBusinessInfoService.initRedis();
        log.info("初始化缓存完成");
    }
}
